package com.wxw.gulidemo.controller;/**
 * @author by xxz
 * @date 2022/5/30
 */

import com.wxw.gulidemo.R;
import org.springframework.web.bind.annotation.*;

/**
 * @Description

 * @author by xxz

 * @date 2022/5/30

 * @throws
 */
@RestController
@CrossOrigin(allowCredentials = "true")    //解决跨域请求问题
@RequestMapping(method = RequestMethod.POST,value = "/eduService/user")
public class EduLoginController {

    //登录
    @PostMapping("/login")
    public R login(){
        return R.ok().data("token","admin");
    }

    //用户信息
    @GetMapping("info")
    public R info(){
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar","http://www.weixintouxiang.cn/weixin/20140607090832328.gif");
    }
}
